package com.trsvax.tapestry.instrumentation.components;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.BeginRender;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.trsvax.tapestry.instrumentation.ThreadDetail;
import com.trsvax.tapestry.instrumentation.services.TapestryAppender;

public class PageInfo {

	@Inject
	private TapestryAppender tapestryAppender;

	@Inject
	private ComponentResources componentResources;
	@Property
	private ThreadDetail detail;

	@BeginRender
	void init() {

		detail = tapestryAppender.getDetail();
		detail.setPageClass(componentResources.getPage().getClass());
	}

}
